.. _granular_coloring: ================= Granular Coloring ================= .. note:: Feature requires a `Momentum Granular `_ license .. image:: ../images/en/ColorGranularShapesRibbon.png :scale: 100 % :align: center Color bodies emitted by an emitter by property. ----- Usage ----- 1. Select **Color Granular Shapes** from the ribbon menu. 2. Select a coloring mode you want to color the bodies by. 3. Select a **minimum value** and **maximum value**. The body will be colored based on what value compared to the minimum and maximum value -------------- Coloring Modes -------------- It is currently possible to color emitted bodies by **velocity** and **max impact energy**. ^^^^^^^^ Velocity ^^^^^^^^ If we choose to color by velocity the color of the bodies will depend on their current velocity. ^^^^^^^^^^^^^^^^^ Max Impact Energy ^^^^^^^^^^^^^^^^^ If we choose the color by max impact energy the color of the bodies will depend on the maximum impact the bodies has registered. The maximum impact a body has registered is equal to the maximum energy dissipated in any contact the body has been a part of. The dissipated energy for a contact is computed as: .. math:: \begin{equation} W = \lambda \frac{( v_t + v_{t + 1})}{2} \end{equation} :label: dissipated_energy Where :math:`\lambda` is the impact lambda, :math:`v_t` is the pre impact speed and :math:`v_{t+1}` is the post impact speed.